/*
 * TouchImageFragment.java
 * classes : com.ruint.lib.mediachooser.fragment.TouchImageFragment
 * @author ruint
 * V 1.0.0
 * Create at 2014-12-8 下午5:32:15
 */
package com.ruint.lib.mediachooser.fragment;

import android.os.Bundle;
import android.view.View;

import com.ruint.core.app.BaseFragment;
import com.ruint.core.utils.bitmap.ImageLoaderUtils;
import com.ruint.core.view.TouchImageView;
import com.ruint.corelib.R;
import com.ruint.lib.mediachooser.core.MediaChooserConstants;

/**
 * com.ruint.lib.mediachooser.fragment.TouchImageFragment
 * 
 * @author ruint <br/>
 *         create at 2014-12-8 下午5:32:15
 */
public class TouchImageFragment extends BaseFragment {
  private TouchImageView mImageView;

  public static TouchImageFragment newInstance(String path) {
    TouchImageFragment fragment = new TouchImageFragment();
    Bundle bundle = new Bundle();
    bundle.putString(MediaChooserConstants.MEDIA_FILE_PATH, path);
    fragment.setArguments(bundle);
    return fragment;
  }

  @Override
  protected int getLayoutResID() {
    return R.layout.fragment_touch_image;
  }

  @Override
  protected void findViews(View rootView) {
    mImageView = findView(mImageView, R.id.touch_image);
  }

  @Override
  protected void onLoadingData() {
    ImageLoaderUtils.getInstance().displayImage(getArguments().getString(MediaChooserConstants.MEDIA_FILE_PATH),
        mImageView);
  }
}
